SSCC: A Sufficiently Smart Compiler-Compiler
نویسنده
چکیده
Attribute grammars are a formalism for specifying computations on syntax trees. SSCC is a practical attribute-grammar system based on a polynomial-time extension of Kastens’s ordered attribute grammars. The system comprises of two subsystems. The generation subsystem computes the evaluation order of attribute occurrences in production rules and translates attribute equations into low-level code for a virtual stack machine. The evaluation subsystem invokes tools to perform lexical and syntactic analysis and evaluates the attribute instances during a traversal of the syntax tree. Three features make SSCC capable of performing any desired computation (within the constraints of ordered attribute grammars): user-defined data types, user-defined functions, and the finalize function. A user may define arbitrary types and functions for use in the attribution equations. After all the attribute instances are evaluated, SSCC calls the finalize function, which may be supplied by a user, and passes it the whole decorated syntax tree. This offers a user opportunities for further processing the tree and the attributes. The SSCC system is semistrongly typed in the sense that type consistency within a specification is fully checked; however, type consistency between a specification and user-supplied functions, which are written in the C language, is not.
منابع مشابه
SSCC: A Software Tool Based on Extended Ordered Attribute Grammars
Attribute grammars are a formalism for specifying computations on syntax trees. SSCC (a Sufficiently Smart Compiler Compiler) is a practical attribute-grammar system based on a polynomial-time extension to Kastens’s ordered attribute grammars. The new class of attribute grammars is strictly larger than the class of ordered attribute grammars, and it retains the property that there is a polynomi...
متن کاملSmart Recompilation in the Xe Compiler Extended Abstract
This article describes the smart recompilation in a compiler for the XE programming language. XE is a data abstraction language that resembles Clu. The problem of smart recompilation consists of the detection of the program units that must be recompiled after a change to some program unit and the detection of compilation order for those program units. The recompilation algorithms of the XE comp...
متن کاملBitML: a calculus for Bitcoin smart contracts
We propose a domain-specific language for smart contracts, which allows participants to transfer cryptocurrency according to agreed contract terms. We define a symbolic and a computational model for reasoning about their security. In the symbolic model, participants act according to the semantics of the domain-specific language. Instead, in the computational model they exchange bitstrings, and ...
متن کاملA Study of the JavaScript Compiler and Symbol Table for the Smart Cross Platform
Smart Cross Platform (SCP) is virtual machine based solution that supports various programming languages and platforms, and its aims are to support programming languages like ISO/IEC C++, Java and Objective C and smartphone platforms such as Android and iOS. Java Script is a programming language to develop HTML5 contents, and the contents are executed by interpreter which included in web browse...
متن کاملA Study on the JavaScript Compiler for Extension of the Smart Cross Platform
In this paper, we will introduce the JavaScript compiler for the SCP (Smart Cross Platform) to expand the SCP’s coverage. The SCP is the virtual machine based solution that supports various programming languages and platforms, and its aims are to support programming languages like ISO/IEC C++, Java and Objective C and smartphone platforms such as Android and iOS. By adding the new compiler to S...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1996